package de.bazinga.rotw.statistics;

import java.util.Comparator;

public class ScoreComparator implements Comparator<String> {

	public int compare(String o1, String o2) {
		String[] data1 = o1.split("__::__");
		int o1Int = Integer.parseInt(data1[0]);

		String[] data2 = o2.split("__::__");
		int o2Int = Integer.parseInt(data2[0]);
		
		if(o1Int > o2Int) return -1;
		else if(o1Int < o2Int) return 1;
		return 0;
	}
}
